package com.sjzsqjy.asdtiang.mysql;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * ShiQiaoUserId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class ShiQiaoUserId implements java.io.Serializable {

	// Fields

	private String sampleId;
	private String date;

	// Constructors

	/** default constructor */
	public ShiQiaoUserId() {
	}

	/** full constructor */
	public ShiQiaoUserId(String sampleId, String date) {
		this.sampleId = sampleId;
		this.date = date;
	}

	// Property accessors

	@Column(name = "sample_id", nullable = false)
	public String getSampleId() {
		return this.sampleId;
	}

	public void setSampleId(String sampleId) {
		this.sampleId = sampleId;
	}

	@Column(name = "date", nullable = false)
	public String getDate() {
		return this.date;
	}

	public void setDate(String date) {
		this.date = date;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof ShiQiaoUserId))
			return false;
		ShiQiaoUserId castOther = (ShiQiaoUserId) other;

		return ((this.getSampleId() == castOther.getSampleId()) || (this
				.getSampleId() != null
				&& castOther.getSampleId() != null && this.getSampleId()
				.equals(castOther.getSampleId())))
				&& ((this.getDate() == castOther.getDate()) || (this.getDate() != null
						&& castOther.getDate() != null && this.getDate()
						.equals(castOther.getDate())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getSampleId() == null ? 0 : this.getSampleId().hashCode());
		result = 37 * result
				+ (getDate() == null ? 0 : this.getDate().hashCode());
		return result;
	}

}